home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIStandardURL.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  169 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIStandardURL.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIStandardURL_h__
  6. #define __gen_nsIStandardURL_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIStandardURL */
  21. #define NS_ISTANDARDURL_IID_STR "8793370a-311f-11d4-9876-00c04fa0cf4a"
  22.  
  23. #define NS_ISTANDARDURL_IID \
  24.   {0x8793370a, 0x311f, 0x11d4, \
  25.     { 0x98, 0x76, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a }}
  26.  
  27. /**
  28.  * nsIStandardURL defines the interface to an URL with the standard
  29.  * file path format common to protocols like http, ftp, and file.
  30.  * It supports initialization from a relative path and provides
  31.  * some customization on how URLs are normalized.
  32.  *
  33.  * @status UNDER_REVIEW
  34.  */
  35. class NS_NO_VTABLE nsIStandardURL : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTANDARDURL_IID)
  39.  
  40.   /**
  41.      * blah:foo/bar    => blah://foo/bar
  42.      * blah:/foo/bar   => blah:///foo/bar
  43.      * blah://foo/bar  => blah://foo/bar
  44.      * blah:///foo/bar => blah:///foo/bar
  45.      */
  46.   enum { URLTYPE_STANDARD = 1U };
  47.  
  48.   /**
  49.      * blah:foo/bar    => blah://foo/bar
  50.      * blah:/foo/bar   => blah://foo/bar
  51.      * blah://foo/bar  => blah://foo/bar
  52.      * blah:///foo/bar => blah://foo/bar
  53.      */
  54.   enum { URLTYPE_AUTHORITY = 2U };
  55.  
  56.   /**
  57.      * blah:foo/bar    => blah:///foo/bar
  58.      * blah:/foo/bar   => blah:///foo/bar
  59.      * blah://foo/bar  => blah://foo/bar
  60.      * blah:///foo/bar => blah:///foo/bar
  61.      */
  62.   enum { URLTYPE_NO_AUTHORITY = 3U };
  63.  
  64.   /**
  65.      * Initialize a standard URL.
  66.      *
  67.      * @param aUrlType       - one of the URLTYPE_ flags listed above.
  68.      * @param aDefaultPort   - if the port parsed from the URL string matches
  69.      *                         this port, then the port will be removed from the
  70.      *                         canonical form of the URL.
  71.      * @param aSpec          - URL string.
  72.      * @param aOriginCharset - the charset from which this URI string
  73.      *                         originated.  this corresponds to the charset
  74.      *                         that should be used when communicating this
  75.      *                         URI to an origin server, for example.  if
  76.      *                         null, then provide aBaseURI implements this
  77.      *                         interface, the origin charset of aBaseURI will
  78.      *                         be assumed, otherwise defaulting to UTF-8 (i.e.,
  79.      *                         no charset transformation from aSpec).
  80.      * @param aBaseURI       - if null, aSpec must specify an absolute URI.
  81.      *                         otherwise, aSpec will be resolved relative
  82.      *                         to aBaseURI.
  83.      */
  84.   /* void init (in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */
  85.   NS_IMETHOD Init(PRUint32 aUrlType, PRInt32 aDefaultPort, const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI) = 0;
  86.  
  87.   /**
  88.      * Control whether or not this URL can be modified.  Protocol handlers
  89.      * can set this flag before handing out an URL to ensure that it is not
  90.      * inadvertently modified.
  91.      */
  92.   /* attribute boolean mutable; */
  93.   NS_IMETHOD GetMutable(PRBool *aMutable) = 0;
  94.   NS_IMETHOD SetMutable(PRBool aMutable) = 0;
  95.  
  96. };
  97.  
  98. /* Use this macro when declaring classes that implement this interface. */
  99. #define NS_DECL_NSISTANDARDURL \
  100.   NS_IMETHOD Init(PRUint32 aUrlType, PRInt32 aDefaultPort, const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI); \
  101.   NS_IMETHOD GetMutable(PRBool *aMutable); \
  102.   NS_IMETHOD SetMutable(PRBool aMutable); 
  103.  
  104. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  105. #define NS_FORWARD_NSISTANDARDURL(_to) \
  106.   NS_IMETHOD Init(PRUint32 aUrlType, PRInt32 aDefaultPort, const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI) { return _to Init(aUrlType, aDefaultPort, aSpec, aOriginCharset, aBaseURI); } \
  107.   NS_IMETHOD GetMutable(PRBool *aMutable) { return _to GetMutable(aMutable); } \
  108.   NS_IMETHOD SetMutable(PRBool aMutable) { return _to SetMutable(aMutable); } 
  109.  
  110. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  111. #define NS_FORWARD_SAFE_NSISTANDARDURL(_to) \
  112.   NS_IMETHOD Init(PRUint32 aUrlType, PRInt32 aDefaultPort, const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aUrlType, aDefaultPort, aSpec, aOriginCharset, aBaseURI); } \
  113.   NS_IMETHOD GetMutable(PRBool *aMutable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMutable(aMutable); } \
  114.   NS_IMETHOD SetMutable(PRBool aMutable) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMutable(aMutable); } 
  115.  
  116. #if 0
  117. /* Use the code below as a template for the implementation class for this interface. */
  118.  
  119. /* Header file */
  120. class nsStandardURL : public nsIStandardURL
  121. {
  122. public:
  123.   NS_DECL_ISUPPORTS
  124.   NS_DECL_NSISTANDARDURL
  125.  
  126.   nsStandardURL();
  127.  
  128. private:
  129.   ~nsStandardURL();
  130.  
  131. protected:
  132.   /* additional members */
  133. };
  134.  
  135. /* Implementation file */
  136. NS_IMPL_ISUPPORTS1(nsStandardURL, nsIStandardURL)
  137.  
  138. nsStandardURL::nsStandardURL()
  139. {
  140.   /* member initializers and constructor code */
  141. }
  142.  
  143. nsStandardURL::~nsStandardURL()
  144. {
  145.   /* destructor code */
  146. }
  147.  
  148. /* void init (in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */
  149. NS_IMETHODIMP nsStandardURL::Init(PRUint32 aUrlType, PRInt32 aDefaultPort, const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI)
  150. {
  151.     return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153.  
  154. /* attribute boolean mutable; */
  155. NS_IMETHODIMP nsStandardURL::GetMutable(PRBool *aMutable)
  156. {
  157.     return NS_ERROR_NOT_IMPLEMENTED;
  158. }
  159. NS_IMETHODIMP nsStandardURL::SetMutable(PRBool aMutable)
  160. {
  161.     return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163.  
  164. /* End of implementation class template. */
  165. #endif
  166.  
  167.  
  168. #endif /* __gen_nsIStandardURL_h__ */
  169.